<?php
// +----------------------------------------------------------------------
// | PHP [ JUST YOU ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2017 http://www.jyphp.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: FlyingPig <flyingpigfp@163.com>
// +----------------------------------------------------------------------

namespace App\Http\Controllers;


use App\Logic\WeChatWithholdLogic;

class WeChatWithhold extends Base
{

    /**
     * @api 返回请求签约的URL
     * @return string
     * @throws \App\Exceptions\ApiException
     */
    public function entrustWeb()
    {
        return $this->returnData(WeChatWithholdLogic::instance()->entrustWebLogic($this->param['ua'], $this->uid));
    }


    public function queryContract()
    {

    }


    /**
     * @api 请求免密扣款
     * @return string
     * @throws \App\Exceptions\ApiException
     */
    public function papPayApply()
    {
        return $this->returnData(WeChatWithholdLogic::instance()->papPayApplyLogic());
    }


    /**
     * @api 申请解约免密扣款
     * @return string
     * @throws \App\Exceptions\ApiException
     */
    public function deleteContract()
    {
        return $this->returnData(WeChatWithholdLogic::instance()->deleteContractLogic($this->uid));
    }

}